const path = require('path');
const webpack = require('webpack');
const config = require('./webpack.base.conf');

config.resolve.alias.set(
  path.join(__dirname, '../../src/config/config.ts'),
  path.join(__dirname, '../../src/config/config-dev.ts'),
);

// don't block webpack while dev
// config.module.rule('eslint')
//   .use('eslint')
//   .options({
//     emitWarning: true,
//   })
//   .end();

config.mode('development');
config.devtool('#source-map');

config.plugin('HotModuleReplacementPlugin')
  .use(webpack.HotModuleReplacementPlugin);

module.exports = config;
